//
//  JLNavigationController.m
//  JL网易彩票progress
//
//  Created by sunjinliang on 15/11/7.
//  Copyright © 2015年 sunjinliang. All rights reserved.
//

#import "JLNavigationController.h"

@interface JLNavigationController ()

@end

@implementation JLNavigationController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}
-(void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated{
    
    if (self.viewControllers.count>0) {
        viewController.hidesBottomBarWhenPushed=YES;
        viewController.navigationItem.leftBarButtonItem=[UIBarButtonItem itemWithTitle:nil norImage:@"NavBack" helImage:nil targert:self action:@selector(pop)];
    }
    
    [super pushViewController:viewController animated:animated];
    
    
}
-(void)pop{
    [self popViewControllerAnimated:YES];
    
}
+(void)initialize{
    //获取导航栏统一管理对象
    UINavigationBar * nc=[UINavigationBar appearanceWhenContainedIn:self, nil];
    [nc setBackgroundImage:[UIImage imageNamed:@"NavBar64"] forBarMetrics:UIBarMetricsDefault];
    NSMutableDictionary * attr=[NSMutableDictionary dictionary];
    //设置文字富文本属性
    attr[NSFontAttributeName]=[UIFont systemFontOfSize:20];
    attr[NSForegroundColorAttributeName]=[UIColor whiteColor];
    [nc setTitleTextAttributes:attr];
    //[nc setTintColor:[UIColor whiteColor]];
    
     
}


@end
